﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Documents;
using System.Windows.Media;
using System.Windows;

namespace BBInterfaceNET.Designer.Views
{
    public class ControlAdorner : Adorner
    {
        private Brush brush;
        private Pen pen;
        public ControlAdorner(UIElement adornedElement)
            : base(adornedElement)
        {
            brush = new SolidColorBrush(Color.FromArgb(50, 255, 0, 0));
            pen = new Pen(Brushes.Red, 1);
        }
        public Rect InsertionRect { get; set; }
        public Rect PlaceholderRect { get; set; }
        protected override void OnRender(System.Windows.Media.DrawingContext drawingContext)
        {
            base.OnRender(drawingContext);

            drawingContext.DrawRectangle(Brushes.Black, null, InsertionRect);
            drawingContext.DrawRectangle(brush, pen, PlaceholderRect);
        }
    }
}
